NoMethodError in _login_bar.html.erb
Reported by Peter Liu | September 6th, 2008 @ 01:23 PM
I created a fresh rails and installed the rest_autentication plugin. I ran the generator with --aasm option and setup layouts/application.html.erb to include:
<%= render :partial=> 'logins/login_bar' %>
I can login but as soon I can login in I get this error:
NoMethodError in Logins#new
Showing logins/_login_bar.html.erb where line #2 raised:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
Extracted source (around line #2):
Any ideas?
I have attached the page.
Comments and changes to this ticket
-
Peter Liu September 6th, 2008 @ 01:33 PM
I narrowed the problem down to login_path(login). That's where the problem is. BTW, I'm using Login as my model instead of User.
-
Peter Liu September 6th, 2008 @ 01:42 PM
- Tag set to routing
I think I may have figured out. The problem is in the route. There is already a login_path and since my model is Login, it's causing a confusion with the routes. It may be good to add it to the instruction to not use Login as the model. I'm still new with Rails and Git so don't know how to contribute yet. I'm also just learning how to use Light House so I hope this ticket is OK.
Thank you.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Restful Authentication Generator
This widely-used plugin provides a foundation for securely managing user
authentication:
* Login / logout
* Secure password handling
* Account activation by validating email
* Account approval / disabling by admin
* Rudimentary hooks for authorization and access control.
http://github.com/technoweenie/restful-authentication/tree